import React from "react";
import { connect } from "react-redux";

class ComB extends React.Component{
    render(){
        // 下面return state拿到传来的props
        // console.log("ComB",this.props)
        return(
            <div>{this.props.count}</div>
        )
    }
}
const mapStateToProps=state=>{
    // console.log("ComB",state);
    return state
}
// B组件是接收方 实现第一个参数
export default connect(mapStateToProps)(ComB)